package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

/**
 * 金蝶-采购退料单物料明细对象 erp_king_procure_refund_material_info
 *
 * @author cxl
 * @date 2024-07-16
 */
@TableName ( "erp_king_procure_refund_material_info" )
@ApiModel ( value = "金蝶-采购退料单物料明细", description = "金蝶-采购退料单物料明细" )
@Data
@Accessors ( chain = true )
public class KingProcureRefundMaterialEntity {

    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    @ApiModelProperty ( "源单类型" )
    @TableField ( "source_type" )
    @Excel ( name = "源单类型" )
    private String sourceType;

    @ApiModelProperty ( "采购订单id" )
    @TableField ( "source_order_id" )
    @Excel ( name = "采购订单id" )
    private String sourceOrderId;

    @ApiModelProperty ( "采购订单code" )
    @TableField ( "source_order_code" )
    @Excel ( name = "采购订单code" )
    private String sourceOrderCode;

    @ApiModelProperty ( "采购入库单id" )
    @TableField ( "source_inventory_id" )
    @Excel ( name = "采购入库单id" )
    private String sourceInventoryId;

    @ApiModelProperty ( "采购入库单code" )
    @TableField ( "source_inventory_code" )
    @Excel ( name = "采购入库单code" )
    private String sourceInventoryCode;

    @ApiModelProperty("源单物料明细id（选单时物料明细id，不是物料id）")
    @TableField ("source_material_detail_id")
    private String sourceMaterialDetailId;

    @ApiModelProperty ( "采购退料单Id" )
    @TableField ( "relation_id" )
    @Excel ( name = "采购退料单Id" )
    private String relationId;

    @ApiModelProperty ( "物料Id" )
    @TableField ( "material_id" )
    @Excel ( name = "物料Id" )
    private String materialId;

    @ApiModelProperty ( "物料编码送金蝶" )
    @TableField ( "material_code" )
    @Excel ( name = "物料编码送金蝶" )
    private String materialCode;

    @ApiModelProperty ( "实退数量" )
    @TableField ( "refund_num" )
    @Excel ( name = "实退数量" )
    private String refundNum;

    @ApiModelProperty ( "物料名称" )
    @TableField ( "material_name" )
    @Excel ( name = "物料名称" )
    private String materialName;

    @ApiModelProperty ( "规格型号" )
    @TableField ( "material_model" )
    @Excel ( name = "规格型号" )
    private String materialModel;

    @ApiModelProperty ( "项目id" )
    @TableField ( "project_id" )
    @Excel ( name = "项目id" )
    private String projectId;

    @ApiModelProperty ( "项目编码" )
    @TableField ( "project_code" )
    @Excel ( name = "项目编码" )
    private String projectCode;

    @ApiModelProperty ( "库存单位" )
    @TableField ( "inventory_unit" )
    @Excel ( name = "库存单位" )
    private String inventoryUnit;

    @ApiModelProperty ( "补料数量" )
    @TableField ( "repair_num" )
    @Excel ( name = "补料数量" )
    private String repairNum;

    @ApiModelProperty ( "扣款数量" )
    @TableField ( "deduction_num" )
    @Excel ( name = "扣款数量" )
    private String deductionNum;

    @ApiModelProperty ( "计价单位" )
    @TableField ( "pricing_unit" )
    @Excel ( name = "计价单位" )
    private String pricingUnit;

    @ApiModelProperty ( "计价数量" )
    @TableField ( "pricing_num" )
    @Excel ( name = "计价数量" )
    private String pricingNum;

    @ApiModelProperty ( "仓库id" )
    @TableField ( "warehouse_id" )
    @Excel ( name = "仓库id" )
    private String warehouseId;

    @ApiModelProperty ( "仓库编码" )
    @TableField ( "warehouse_code" )
    @Excel ( name = "仓库编码" )
    private String warehouseCode;

    @ApiModelProperty ( "仓位" )
    @TableField ( "warehouse_position" )
    @Excel ( name = "仓位" )
    private String warehousePosition;

    @ApiModelProperty ( "库存状态" )
    @TableField ( "inventory_status" )
    @Excel ( name = "库存状态" )
    private String inventoryStatus;

    @ApiModelProperty ( "单价" )
    @TableField ( "price" )
    @Excel ( name = "单价" )
    private String price;

    @ApiModelProperty ( "折扣额" )
    @TableField ( "discount_amount" )
    @Excel ( name = "折扣额" )
    private String discountAmount;

    @ApiModelProperty ( "金额" )
    @TableField ( "amount_money" )
    @Excel ( name = "金额" )
    private String amountMoney;

    @ApiModelProperty ( "辅单位" )
    @TableField ( "auxiliary_unit" )
    @Excel ( name = "辅单位" )
    private String auxiliaryUnit;

    @TableField ( "amount_money_base" )
    @ApiModelProperty ( "金额(本位币)" )
    @Excel ( name = "金额(本位币)" )
    private String amountMoneyBase;

    @TableField ( "refund_num_auxiliary" )
    @ApiModelProperty ( "实退数量(辅单位)" )
    @Excel ( name = "实退数量" )
    private String refundNumAuxiliary;

    @ApiModelProperty ( "开票结束状态" )
    @TableField ( "invoicing_completed_status" )
    @Excel ( name = "开票结束状态" )
    private String invoicingCompletedStatus;

    @ApiModelProperty ( "是否赠品" )
    @TableField ( "is_giveaway" )
    @Excel ( name = "是否赠品" )
    private Boolean isGiveaway;

    @ApiModelProperty ( "计价基本数量" )
    @TableField ( "pricing_num_base" )
    @Excel ( name = "计价基本数量" )
    private String pricingNumBase;

    @ApiModelProperty ( "定价单位" )
    @TableField ( "fixed_pricing_unit" )
    @Excel ( name = "定价单位" )
    private String fixedPricingUnit;

    @ApiModelProperty ( "采购单位" )
    @TableField ( "purchase_unit" )
    @Excel ( name = "采购单位" )
    private String purchaseUnit;

    @ApiModelProperty ( "供应商物料编码" )
    @TableField ( "supplier_material_code" )
    @Excel ( name = "供应商物料编码" )
    private String supplierMaterialCode;

    @ApiModelProperty ( "供应商物料名称" )
    @TableField ( "supplier_material_name" )
    @Excel ( name = "供应商物料名称" )
    private String supplierMaterialName;

    @ApiModelProperty ( "采购数量" )
    @TableField ( "purchase_num" )
    @Excel ( name = "采购数量" )
    private String purchaseNum;

    @TableField ( "cost_price_base" )
    @ApiModelProperty ( "成本价(本位币)" )
    @Excel ( name = "成本价")
    private String costPriceBase;

    @ApiModelProperty ( "应退数量" )
    @TableField ( "refunded_num" )
    @Excel ( name = "应退数量" )
    private String refundedNum;

    @ApiModelProperty ( "供应商批号" )
    @TableField ( "supplier_batch_num" )
    @Excel ( name = "供应商批号" )
    private String supplierBatchNum;

    @ApiModelProperty ( "批号" )
    @TableField ( "batch_num" )
    @Excel ( name = "批号" )
    private String batchNum;

    @ApiModelProperty("行号")
    @TableField ("line_number")
    @Excel (name = "行号")
    private String lineNumber;

    @ApiModelProperty ("业务含税单价")
    @TableField ("business_tax_price")
    @Excel (name = "业务含税单价")
    private String businessTaxPrice;

    @ApiModelProperty ("业务单价")
    @TableField ("business_price")
    @Excel (name = "业务单价")
    private String businessPrice;

    @ApiModelProperty ( "辅助单位数量" )
    @TableField ( "auxiliary_unit_num" )
    @Excel ( name = "辅助单位数量" )
    private String auxiliaryUnitNum;

    @ApiModelProperty ( "货主类型" )
    @TableField ( "cargo_owner_type" )
    @Excel ( name = "货主类型" )
    private String cargoOwnerType;

    @ApiModelProperty ( "税率" )
    @TableField ( "tax_rate" )
    @Excel ( name = "税率" )
    private String taxRate;

    @ApiModelProperty ( "折扣率" )
    @TableField ( "discount_rate" )
    @Excel ( name = "折扣率" )
    private String discountRate;

    @ApiModelProperty ( "净价" )
    @TableField ( "net_amount" )
    @Excel ( name = "净价" )
    private String netAmount;

    @ApiModelProperty ( "含税单价" )
    @TableField ( "contains_tax_price" )
    @Excel ( name = "含税单价" )
    private String containsTaxPrice;

    @ApiModelProperty ( "税额" )
    @TableField ( "tax_amount" )
    @Excel ( name = "税额" )
    private String taxAmount;

    @ApiModelProperty ( "价税合计" )
    @TableField ( "total_tax_price" )
    @Excel ( name = "价税合计" )
    private String totalTaxPrice;

    @ApiModelProperty ( "基本单位" )
    @TableField ( "base_unit" )
    @Excel ( name = "基本单位" )
    private String baseUnit;

    @ApiModelProperty ( "基本单位单价" )
    @TableField ( "base_unit_price" )
    @Excel ( name = "基本单位单价" )
    private String baseUnitPrice;

    @ApiModelProperty ( "成本价" )
    @TableField ( "cost_price" )
    @Excel ( name = "成本价" )
    private String costPrice;

    @ApiModelProperty ( "总成本" )
    @TableField ( "total_cost" )
    @Excel ( name = "总成本" )
    private String totalCost;

    @TableField ( "tax_amount_base" )
    @ApiModelProperty ( "税额(本位币)" )
    @Excel ( name = "税额(本位币)" )
    private String taxAmountBase;

    @ApiModelProperty ( "单价折扣" )
    @TableField ( "price_discount" )
    @Excel ( name = "单价折扣" )
    private String priceDiscount;

    @TableField ( "total_tax_price_base" )
    @ApiModelProperty ( "价税合计(本位币)" )
    @Excel ( name = "价税合计(本位币)" )
    private String totalTaxPriceBase;

    @TableField ( "total_cost_base" )
    @ApiModelProperty ( "总成本(本位币)" )
    @Excel ( name = "总成本(本位币)" )
    private String totalCostBase;

    @ApiModelProperty ( "货主" )
    @TableField ( "cargo_owner" )
    @Excel ( name = "货主" )
    private String cargoOwner;

    @ApiModelProperty ( "保管员" )
    @TableField ( "keeping_by" )
    @Excel ( name = "保管员" )
    private String keepingBy;

    @TableField ( "purchase_num_base" )
    @ApiModelProperty ( "采购数量(基本单位)" )
    @Excel ( name = "采购数量(基本单位)" )
    private String purchaseNumBase;

    @ApiModelProperty ( "库存基本数量" )
    @TableField ( "inventory_num_base" )
    @Excel ( name = "库存基本数量" )
    private String inventoryNumBase;

    @ApiModelProperty ( "备注" )
    @TableField ( "remark" )
    @Excel ( name = "备注" )
    private String remark;

    @ApiModelProperty ( "创建人" )
    @TableField ( "create_by" )
    @Excel ( name = "创建人" )
    private String createBy;

    @ApiModelProperty ( "创建时间" )
    @TableField ( "create_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    @Excel ( name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date createTime;

    @ApiModelProperty ( "修改人" )
    @TableField ( "update_by" )
    @Excel ( name = "修改人" )
    private String updateBy;

    @ApiModelProperty ( "修改日期" )
    @TableField ( "update_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    @Excel ( name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date updateTime;

    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    @Excel ( name = "是否可用" )
    @TableLogic
    private Integer isUsed;

    @ApiModelProperty ( "退料类型，取退料主表;1:退货退款；2：退货补货" )
    @TableField ( exist = false )
    private Integer type;

    /** 汇率 */
    @ApiModelProperty ("汇率")
    @TableField ("exchange_rate")
    @Excel (name = "汇率")
    private String exchangeTate;

    @ApiModelProperty("物料明细分录信息")
    @TableField(exist = false)
    private KingProcureRefundMaterialDetailEntity materialDetail;




    @ApiModelProperty("库存单位名称")
    @TableField(exist = false)
    private String inventoryUnitName;

    @ApiModelProperty("计价单位名称")
    @TableField(exist = false)
    private String pricingUnitName;

    @ApiModelProperty("仓库名称")
    @TableField(exist = false)
    private String warehouseName;

    @ApiModelProperty("库存状态名称")
    @TableField(exist = false)
    private String inventoryStatusName;

    @ApiModelProperty("采购单位名称")
    @TableField(exist = false)
    private String purchaseUnitName;


}
